package cn.samir.sudoku.core;

public class RankBean implements Comparable<RankBean> {
	
	
	public String nickname;//昵称
	public String usericon;//头像
	public int number;//总共多少关卡
	public int totalscore;//
	public String gender;
	public RankBean() {
		super();
	}

	public RankBean(String nickname, String usericon, int number, int totalscore) {
		super();
		this.nickname = nickname;
		this.usericon = usericon;
		this.number = number;
		this.totalscore = totalscore;
	}

	@Override
	public String toString() {
		return "RankBean [nickname=" + nickname + ", usericon=" + usericon
				+ ", number=" + number + ", totalscore=" + totalscore + "]";
	}

	@Override
	public int compareTo(RankBean another) {

		return (this.totalscore < another.totalscore ? 1
				: (this.totalscore == another.totalscore ? 0 : -1));
	}
}
